To do something “by the skin of one's teeth” is to just manage to get it accomplished: “I never thought we'd get the magazine to the printer by the deadline, but we made it by the skin of our teeth.”